﻿<AttributeUsage(AttributeTargets.Class, Inherited:=False, AllowMultiple:=True)> _
Public NotInheritable Class ChildTableAttribute
    Inherits Attribute

    Public Property Description As String

    Public Property EntityType As Type

    Public Property CanViewRecords As Boolean

    Public Property CanAddRecords As Boolean

    Public Property CanEditRecords As Boolean

    Public Property CanDeleteRecords As Boolean

    Public Sub New(ByVal entityType As Type, _
                   Optional ByVal description As String = "", _
                   Optional ByVal canViewRecords As Boolean = True, _
                   Optional ByVal canEditRecords As Boolean = True, _
                   Optional ByVal canAddRecords As Boolean = True, _
                   Optional ByVal canDeleteRecords As Boolean = True)

        Me.EntityType = entityType
        Me.Description = description
        Me.CanViewRecords = canViewRecords
        Me.CanEditRecords = canEditRecords
        Me.CanAddRecords = CanAddRecords
        Me.CanDeleteRecords = canDeleteRecords

    End Sub

End Class

